import Vue from "vue";
import VueRouter from "vue-router";
import wode_b from "../views/wode_b.vue";
import cao_b from "../views/cao_b.vue";
import yue_b from "../views/yue_b.vue";
import yuewenti_b from "../views/yuewenti_b.vue";
import jifen_b from "../views/jifen_b.vue";
import jifenshuoming_b from "../views/jifenshuoming_b.vue";
import jifenshangcheng_b from "../views/jifenshangcheng_b.vue";
import wodeyouhui_b from "../views/wodeyouhui_b.vue";
import hobaoshuoming from "../views/hobaoshuoming_b.vue";
import Shouye from "../views/Shouye.vue";
import Sousuo from "../views/Sousuo.vue";
import Dingdan from "../views/Dingdan.vue";
import Dianpu from "../views/Dianpu.vue";
import Xiangqing from "../views/Xiangqing.vue";
import shangjiaxiangqing from "..//views/Shangjiaxiangqing.vue"
import  Anquangongshi from "../views/Anquangongshi.vue";
import  Beizhu from "../views/Beizhu.vue";
import  Dhhb from "../views/Duihuanhongbao.vue";
import  Tuijian from "../views/Tuijianyoujiang.vue";

Vue.use(VueRouter);


const routes = [
	{
			path:'/tuijian',
			name:"tuijian",
			component:Tuijian,
		},
	
	{
			path:'/dhhb',
			name:"dhhb",
			component:Dhhb,
		},
	{
			path:'/beizhu',
			name:"beizhu",
			component:Beizhu,
		},
	{
			path:'/aqgs',
			name:"aqgs",
			component:Anquangongshi,
		},
	
	{
		path:'/xiangqing',
		name:"xiangqing",
		component:Xiangqing,
	},
	{
		path:'/sjxq',
		name:"sjxq",
		component:shangjiaxiangqing,
	},
	{
		path: "/",
		name: "home",
		component: () =>
			import("../views/Home.vue")
	},
	{
		path: "/login",
		name: "login",
		component: () =>
			import("../views/Login.vue")
	},
	{
		path: '/dianpu',
		name: "dianpu",
		component: Dianpu,
	},
	{
		path: '/dingdan',
		name: "dingdan",
		component: Dingdan
	},
	{
		path: '/sousuo',
		name: "sousuo",
		component: Sousuo
	},
	{
		path: "/shouye",
		name: "shouye",
		component: Shouye
	},
	{
		path: "/about",
		name: "about",
		meta: {
			index: 1
		}
	},
	{
		path: "/wode",
		name: "wode",
		component: wode_b
	},
	{
		path: "/cao",
		name: "cao",
		component: cao_b
	},
	{
		path: "/yue",
		name: "yue",
		component: yue_b
	},
	{
		path: "/yuewenti",
		name: "yuewenti",
		component: yuewenti_b
	},
	{
		path: "/jifen",
		name: "jifen",
		component: jifen_b
	},
	{
		path: "/jifenshuoming",
		name: "jifenshuoming",
		component: jifenshuoming_b
	},
	{
		path: "/jifenshangcheng",
		name: "jifenshangcheng",
		component: jifenshangcheng_b
	},
	{
		path: "/wodeyouhui",
		name: "wodeyouhui",
		component: wodeyouhui_b
	},
	{
		path: "/hobaoshuoming",
		name: "hobaoshuoming",
		component: hobaoshuoming
	},
	{
		path: '/home/:id',
		name: 'shopshow',
		meta: {
			index: 1
		},
		component: () =>
			import("../views/shopshow.vue")
	},
	{
			path: "/xzdz",
			name: "xzdz",
			component: () =>
				import("../views/xzdz_d.vue")
		},
		{
			path: "/xzdz/tjdz/scdz",
			name: "scdz",
			component: () =>
				import("../views/scdz_d.vue")
		},
		{
			path: "/xzdz/tjdz",
			name: "tjdz",
			component: () =>
				import("../views/tjdz_d.vue")
		},
		{
			path: "/dingwei",
			name: "dingwei",
			component: () =>
				import("../views/dingwei_d.vue")
	
		},
		{
			path: "/shouye",
			name: "shouye",
			component: Shouye
		},
];

const router = new VueRouter({
	routes
});
//路由守卫
// router.beforeEach((to, from, next) => {
// 	const isLogin = localStorage.ele_login ? true : false;
// 	if (to.path == '/login') {
// 		next();
// 	} else {
// 		//是否在登陆状态下
// 		isLogin ? next() : next('/login');
// 	}
// });

export default router;
